<?php
!defined('P_W') && exit('Forbidden');

class PW_TypeDataPrice {
	function getData($config) {
		$num = (int)$config['num'] ? (int) $config['num'] : 3;
		$hid = (int)$config['hid'];
		return $this->_getData($hid,$num);
	}
	function _getData($hid,$num) {
		$priceDetailDB = House::loadDB('pricedetail');
		$temp = $priceDetailDB->getPriceDetail($hid,$num);
		$result = array();
		foreach ($temp as $key=>$value) {
			$result[] = array('title'=>substrs($value['title'],20),'currentprice'=>$value['currentprice']);
		}
		return $result;
	}
}
?>